﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Example.Data.Context;
using System.Data.Entity;

namespace Example.Data
{
    public class DatabaseInitializer : DropCreateDatabaseAlways<DataContext>
    {
        protected override void Seed(DataContext context)
        {
            context.Users.Add(new Base.Entities.User
            {
                Login = "test@example.ru",
                Password = "123",
                Registration = DateTime.Now,
                LastVisit = DateTime.Now,
                Active = true

            });

            context.SaveChanges();
        }
    }
}
